<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-COMPATIBLE" content="IE=edge">
    <title>留言板</title>
    <link rel="stylesheet" href="http://cdn.bootcss.com/bootstrap/3.3.2/css/bootstrap.min.css">
    <script src="http://cdn.bootcss.com/jquery/1.11.2/jquery.min.js"></script>
    <script src="http://cdm.bootcss.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
    <style type="text/css">
        .zong{width: 1200px; float: left; text-align: center; margin-bottom: 20px;}
        .diyi{width: 190px; height: 40px; background: #fff; float: left;}
        .dier{width: 790px; height: 40px; background: #fff; float: left;}
        .disan{width: 190px; height: 40px; background: #fff; float: left;}
        .clear{ clear:both}
    </style>

</head>

<body>
    <div class="zong">
        <h1 style="text-align: center;">留言板</h1>
    </div>
    <div class="zong">
        <p>
            @if(!empty($user_status))
                @if($user_status == 1)
                    {!! Form::open(['url'=>'message/content']) !!}
                    <label for="message">留言</label>
                    <input type="textare" name="message" id="" value=""/>
                    <input type="submit" value="提交"/>
                <!--{!! Form::submit('提交'); !!}-->

                    {!! Form::close() !!}
                    {!! link_to('message/quit', '退出'); !!}
                    @if(!empty($is_admin))
                        {!! link_to('message/manage', '管理会员'); !!}
                    @endif
                @endif
            @else
                {!! link_to("message/login", "请登录留言") !!}
            @endif
        </p>
    </div>


    <div class="zong">
        @if(!$comments->isEmpty())
            @foreach($comments as $comment)
                <div class="diyi">{{ $comment->user_name }}</div>
                <div class="dier">{{$comment->text }}</div>
                <div class="disan">{{$comment->create_time }}</div>
            @endforeach
        @else
            暂无留言
        @endif
    </div>
    <div class="clear"></div>

    <!-- 分页 -->
    <div class="zong">
        {!! $comments->links() !!}
    </div>

</body>
</html>




